#ifndef MOUSE_H_INCLUDED
#define MOUSE_H_INCLUDED

#include "types.h"
#include "window.h"

class Mouse : public Instance, public Singleton<Mouse>
{
    public:
        Mouse(const string& name = "Untitled", ClassId* classId = sClassId);
        virtual ~Mouse();

        // Event handling
        static void handleButtonEvent(SDL_MouseButtonEvent* event, float dt);
        virtual void onButtonDown(Window* window, Uint8 button, int x, int y, float dt);
        virtual void onButtonUp(Window* window, Uint8 button, int x, int y, float dt);
        static void handleMotionEvent(SDL_MouseMotionEvent* event, float dt);
        virtual void onMotion(Window* window, int dx, int dy, int x, int y, float dt);
        static void handleWheelEvent(SDL_MouseWheelEvent* event, float dt);
        virtual void onWheel(Window* window, int dx, int dy, float dt);

        // Instance
        DECLARE_CLASSID(Mouse);
        virtual bool load(DataStream* ds = 0);
        virtual bool save(DataStream* ds = 0);

    private:
};

#endif // MOUSE_H_INCLUDED
